<?php echo $this->fetch('inc/header.html'); ?> 
<?php
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/message.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/message.js";
$this->_var['dpagecss'][] = $this->_var['TMPL_REAL']."/css/message.css";
?>
<link rel="stylesheet" type="text/css" href="<?php 
$k = array (
  'name' => 'parse_css',
  'v' => $this->_var['dpagecss'],
);
echo $k['name']($k['v']);
?>" />
<script type="text/javascript" src="<?php 
$k = array (
  'name' => 'parse_script',
  'v' => $this->_var['dpagejs'],
  'c' => $this->_var['dcpagejs'],
);
echo $k['name']($k['v'],$k['c']);
?>"></script>

<div class="blank"></div>

<div class="shadow_bg">
	<div class="wrap white_box"">
		<div class="page_title">
			私信
		</div>
		<div class="switch_nav" style="height:1px;">
		</div>
		
		<div class="full">
		<?php if ($this->_var['contact_list']): ?>
		<div class="contact_count"><?php echo $this->_var['contact_count']; ?>个联系人</div>
		<?php $_from = $this->_var['contact_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'contact_item');if (count($_from)):
    foreach ($_from AS $this->_var['contact_item']):
?>
		<div class="contact_item">
			<div class="contact_avatar"><?php 
$k = array (
  'name' => 'show_avatar',
  'p' => $this->_var['contact_item']['dest_user_id'],
  't' => 'small',
);
echo $k['name']($k['p'],$k['t']);
?></div>
			<div class="contact_info">
				<?php if ($this->_var['contact_item']['message_type'] == 'inbox'): ?>
				<a href="<?php
echo parse_url_tag("u:home|"."id=".$this->_var['contact_item']['dest_user_id']."".""); 
?>" class="linkgreen"><?php echo $this->_var['contact_item']['dest_user_name']; ?></a> : <?php 
$k = array (
  'name' => 'msubstr',
  'v' => $this->_var['contact_item']['message'],
  'b' => '0',
  'e' => '150',
);
echo $k['name']($k['v'],$k['b'],$k['e']);
?>
				<?php endif; ?>
				<?php if ($this->_var['contact_item']['message_type'] == 'outbox'): ?>
				发送给 <a href="<?php
echo parse_url_tag("u:home|"."id=".$this->_var['contact_item']['dest_user_id']."".""); 
?>" class="linkgreen"><?php echo $this->_var['contact_item']['dest_user_name']; ?></a> : <?php 
$k = array (
  'name' => 'msubstr',
  'v' => $this->_var['contact_item']['message'],
  'b' => '0',
  'e' => '150',
);
echo $k['name']($k['v'],$k['b'],$k['e']);
?>
				<?php endif; ?>
				
				<div class="blank"></div>
				<span class="message_pass_date"><?php 
$k = array (
  'name' => 'pass_date',
  'v' => $this->_var['contact_item']['create_time'],
);
echo $k['name']($k['v']);
?></span>
				<?php if ($this->_var['contact_item']['has_new'] > 0): ?>
				<span class="has_new"></span>
				<?php endif; ?>
				<div class="message_op"><a href="<?php
echo parse_url_tag("u:message#history|"."id=".$this->_var['contact_item']['dest_user_id']."".""); 
?>" class="linkgreen">共<?php echo $this->_var['contact_item']['total']; ?>条对话</a> | <a href="javascript:void(0);" onclick="send_message(<?php echo $this->_var['contact_item']['dest_user_id']; ?>);" class="linkgreen">回复</a> | <a href="<?php
echo parse_url_tag("u:message#delcontact|"."id=".$this->_var['contact_item']['dest_user_id']."".""); 
?>" class="linkgreen delcontact">删除</a></div>
				<div class="blank5"></div>
			</div>
		</div>
		<div class="blank"></div>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		<div class="blank"></div>
		<div class="pages"><?php echo $this->_var['pages']; ?></div>
		<?php else: ?>
		<div class="empty_tip">没有任何私信记录</div>
		<?php endif; ?>
		</div>
				
	</div>
</div>
<div class="blank"></div>
<?php echo $this->fetch('inc/footer.html'); ?> 